﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using UIShell.OSGi;
using Pasys.PresentationCore;

namespace Pasys.Document.Views
{
    public partial class FrmInner01 : Form
    {
        public FrmInner01()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            var commandBus = BundleRuntime.Instance.GetFirstOrDefaultService<ICommandBusService>();
            commandBus.PublicCommandStatus(textBox1.Text, CommandStatus.Disabled);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            var commandBus = BundleRuntime.Instance.GetFirstOrDefaultService<ICommandBusService>();
            commandBus.PublicCommandStatus(textBox1.Text , CommandStatus.Enabled);
        }

        private void button4_Click(object sender, EventArgs e)
        {
            var commandBus = BundleRuntime.Instance.GetFirstOrDefaultService<ICommandBusService>();
            commandBus.PublicCommandStatus(null,textBox1.Text, CommandStatus.Disabled);
        }

        private void button3_Click(object sender, EventArgs e)
        {
            var commandBus = BundleRuntime.Instance.GetFirstOrDefaultService<ICommandBusService>();
            commandBus.PublicCommandStatus(null,textBox1.Text, CommandStatus.Enabled);
        }
    }
}
